package com.sdll.algorithm;

import java.util.Scanner;

public class CharDisplace {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			
			String str = scanner.next();
	//		String str = "AkleBiCeilD";
			
	//		System.out.println("beginstr : " + str);
			str = displaceCharacter(str);
	//		System.out.println("endstr : " + str);
			System.out.println(str);
		}
	}
	
	
	public static String displaceCharacter(String str){
		char[] dc = str.toCharArray();
		StringBuilder strLower = new StringBuilder();
		StringBuilder strUpper = new StringBuilder();
		for (int i = 0; i < dc.length; i++) {
			if(Character.isUpperCase(dc[i])) {//大写
				strUpper.append(dc[i]);
			}else {//小写
				strLower.append(dc[i]);
			}
		}
//		if(strUpper.length() > 0){
//			char temp;//ADFAADJAadsfnen
////			System.out.println("strUpper :" + strUpper.toString());
//			char[] dcUpper = strUpper.toString().toCharArray();
//			for (int i = 0; i < dcUpper.length; i++) {
//				for (int j = i + 1; j < dcUpper.length; j++) {
//					if(dcUpper[i] > dcUpper[j]) {
//						temp = dcUpper[i];
//						dcUpper[i] = dcUpper[j];
//						dcUpper[j] = temp;
//					}else{
//						continue;
//					}
//				}
//			}
////			System.out.print("dcUpper[i]:");
////			for (int i = 0; i < dcUpper.length; i++) {
////				System.out.print(dcUpper[i]);
////			}
//			strUpper = new StringBuilder();
//			strUpper.append(dcUpper);
//			
//		}
		String string = strLower.toString() + strUpper.toString();
		return string;
	}

}
